home *** CD-ROM | disk | FTP | other *** search
/ CDUTIL 13 / CDUTIL #13 Julio 1995.iso / windows / exppubl / epw1.lib / ACPS.W30 next >
Encoding:
Text File  |  1992-05-20  |  12.4 KB  |  756 lines

  1. %05.11.92 jh Fixed for jumping EPS files
  2. %01.07.92 dj Removed the PU stuff not needed.
  3. %10.03.91 dj Fixed the box problem.
  4. %10.03.91 dj Took out teststate and /B not needed.
  5. %10.02.91 dj Took out acnormal not needed.
  6. %10.01.91 dj Removed clipbox and old audit trails.
  7. % 8.27.91 sr PU function
  8. /ACDict 400 dict def
  9. ACDict begin
  10. /bd{bind def}bind def
  11. /ed{exch def}bd
  12. /ld{load def}bd
  13. /tr/translate ld
  14. /gs/gsave ld
  15. /gr/grestore ld
  16. /M/moveto ld
  17. /L/lineto ld
  18. /rmt/rmoveto ld
  19. /rlt/rlineto ld
  20. /rct/rcurveto ld
  21. /st/stroke ld
  22. /np/newpath ld
  23. /sm/setmatrix ld
  24. /cm/currentmatrix ld
  25. /cp/closepath ld
  26. /ARC/arcn ld
  27. /TR{65536 div}bd
  28. /slj/setlinejoin ld
  29. /slc/setlinecap ld
  30. /sml/setmiterlimit ld
  31. /slw/setlinewidth ld
  32. /ct/curveto ld
  33. /PW 1 def
  34. /iP 5 def
  35. /mxF matrix def
  36. /mxE matrix def
  37. /fBE false def
  38. /iDevRes 72 0 matrix defaultmatrix
  39.  dtransform dup mul exch
  40.  dup mul add sqrt def
  41. /EJ{gsave showpage grestore}bd
  42. /#C{userdict begin/#copies ed end}bd
  43. /SetMetrics
  44. {
  45.   6 1 roll       
  46.   /iRes ed  
  47.   /cyP ed   
  48.   /cxP ed   
  49.   /cyM ed   
  50.   /cxM ed   
  51.   72 iRes div dup
  52.   neg scale
  53.   0 ne
  54.     {cyP cxP neg tr 90 rotate cxM cyM}
  55.     {cxM cyM cyP sub}
  56.   ifelse
  57.   tr
  58.   0 0 transform
  59.   .25 add round
  60.   .25 sub exch
  61.   .25 add round
  62.   .25 sub exch
  63.   itransform
  64.   tr
  65. }bd
  66. /AC_Start_EPS
  67. {
  68.   /OldCTM m cm def         
  69.   iRes 100 div cxM neg mul iRes 100 div cyP cyM sub mul tr     
  70.   iRes 72 div dup neg scale
  71.   /AC_EPS_Save save def        
  72.   0 setgray 0 slc 1 slw 0 slj 10 sml []0 setdash np
  73.   /showpage{}def
  74.   /setscreen{pop pop pop}def
  75. }bd
  76. /AC_End_EPS
  77. {
  78.   AC_EPS_Save restore
  79.   OldCTM sm
  80. }bd
  81. /SJ
  82. {
  83.   1 index 0 eq
  84.     {pop pop/fBE false def}
  85.     {1 index/Break ed div/dxBreak ed/fBE true def}
  86.   ifelse
  87. }bd
  88. /PC
  89. {
  90.   iPUsingRGB 1 eq
  91.     {iPRY iPGM iPBC setrgbcolor}
  92.     {iPBC iPGM iPRY iPK setcmykcolor}
  93.   ifelse
  94. }bd
  95. /pC
  96. {
  97.   iPUsingRGB 0 eq
  98.   {
  99.     1000 div /iPK ed
  100.   }
  101.   if
  102.   1000 div/iPBC ed
  103.   1000 div/iPGM ed
  104.   1000 div/iPRY ed
  105. }bd
  106. /BC
  107. {
  108.   iBUsingRGB 1 eq
  109.     {iBRY iBGM iBBC setrgbcolor}
  110.     {iBBC iBGM iBRY iBK setcmykcolor}
  111.   ifelse
  112. }bd
  113. /bC
  114. {
  115.   iBUsingRGB 0 eq
  116.   {
  117.     1000 div /iBK ed
  118.   }
  119.   if
  120.   1000 div/iBBC ed
  121.   1000 div/iBGM ed
  122.   1000 div/iBRY ed
  123. }bd
  124. /TC
  125. {
  126.   iTUsingRGB 1 eq
  127.     {iTRY iTGM iTBC setrgbcolor}
  128.     {iTBC iTGM iTRY iTK setcmykcolor}
  129.   ifelse
  130. }bd
  131. /tC
  132. {
  133.   iTUsingRGB 0 eq
  134.   {
  135.     1000 div /iTK ed
  136.   }
  137.   if
  138.   1000 div/iTBC ed
  139.   1000 div/iTGM ed
  140.   1000 div/iTRY ed
  141. }bd
  142. /HC
  143. {
  144.   iHUsingRGB 1 eq
  145.     {iHRY iHGM iHBC setrgbcolor}
  146.     {iHBC iHGM iHRY iHK setcmykcolor}
  147.   ifelse
  148. }bd
  149. /hC
  150. {
  151.   iHUsingRGB 0 eq
  152.   {
  153.     1000 div /iHK ed
  154.   }
  155.   if
  156.   1000 div/iHBC ed
  157.   1000 div/iHGM ed
  158.   1000 div/iHRY ed
  159. }bd
  160. /min
  161. {
  162.   2 copy gt{exch}if pop
  163. }bd
  164. /max
  165. {
  166.   2 copy lt{exch}if pop
  167. }bd
  168. /CP
  169. {
  170.   /ft ed
  171.   {
  172.     {
  173.       ft 0 eq
  174.         {clip}
  175.         {eoclip}
  176.       ifelse
  177.     }
  178.     stopped
  179.       {currentflat 1 add setflat}
  180.       {exit}
  181.     ifelse
  182.   }
  183.   loop
  184. }bd
  185. /F
  186. {
  187.   /ft ed
  188.   fm 256 and 0 ne
  189.   {
  190.     gs
  191.       FC
  192.       ft 0 eq
  193.         {fill}
  194.         {eofill}
  195.       ifelse
  196.     gr
  197.   }
  198.   if
  199.   fm 1536 and 0 ne
  200.   {
  201.     SHR
  202.     gs
  203.       HC ft CP
  204.       fm 1024 and 0 ne
  205.         {/Tmp save def pfill Tmp restore}
  206.         {fm 15 and hfill}
  207.       ifelse
  208.     gr
  209.   }
  210.   if
  211. }bd
  212. /patfont 10 dict def
  213. patfont begin
  214.   /FontType 3 def
  215.   /FontMatrix[-1 0 0 1 4 0] def
  216.   /FontBBox [0 0 1 1] def
  217.   /Encoding StandardEncoding def
  218.   /BuildChar
  219.   {
  220.     pop pop
  221.     1 0 0 0 1 1 setcachedevice
  222.     16 16 false[16 0 0 16 0 0]{pat}imagemask
  223.   }bd
  224. end
  225. /p
  226. {
  227.   /pat 32 string def              
  228.   {                               
  229.   }                  
  230.   forall                          
  231.   0 1 7                                   
  232.   {                                                  
  233.     dup 2 mul pat exch 3 index put                                  
  234.     dup 2 mul 1 add pat exch 3 index put
  235.     dup 2 mul 16 add pat exch 3 index put
  236.     2 mul 17 add pat exch 2 index put
  237.     pop
  238.   }
  239.   for
  240. }bd
  241. /pfill
  242. {
  243.   /w iRes 10 div 8 div round 8 mul def
  244.   /PatFont patfont definefont pop
  245.   /PatFont findfont w scalefont setfont
  246.   /ch(AAAA)def
  247.   X0 w 4 mul X1
  248.   {
  249.     Y0 w Y1
  250.     {
  251.       1 index exch M ch show
  252.     }
  253.     for
  254.     pop
  255.   }
  256.   for
  257. }bd
  258. /hfill
  259. {
  260.   2 slw [] 0 setdash n
  261.   /w iRes 20 div 8 div round 8 mul def
  262.   dup 0 eq{horz}if
  263.   dup 1 eq{vert}if
  264.   dup 2 eq{fdiag}if
  265.   dup 3 eq{bdiag}if
  266.   dup 4 eq{horz vert}if
  267.   5 eq{fdiag bdiag}if
  268. }bd
  269. /vert
  270. {
  271.   X0 w X1
  272.   {
  273.     dup Y0 M Y1 L st
  274.   }for
  275. }bd
  276. /horz
  277. {
  278.   Y0 w Y1
  279.   {
  280.     dup X0 exch M X1 exch L st
  281.   }for
  282. }bd
  283. /fdiag
  284. {
  285.   X0 w X1
  286.   {Y0 M X1 X0 sub dup rlt st}for
  287.   Y0 w Y1
  288.   {X0 exch M Y1 Y0 sub dup rlt st}for
  289. }bd
  290. /bdiag
  291. {
  292.   X0 w X1
  293.   {Y1 M X1 X0 sub dup neg rlt st}for
  294.   Y0 w Y1
  295.   {X0 exch M Y1 Y0 sub dup neg rlt st}for
  296. }bd
  297. /SHR
  298. {
  299.   pathbbox
  300.   cvi 16#F or/Y1 ed
  301.   cvi 16#F or/X1 ed
  302.   cvi 16#FFFFFFF0 and/Y0 ed
  303.   cvi 16#FFFFFFF0 and/X0 ed
  304. }bd
  305. /S
  306. {
  307.   PW slw ACPenColor st
  308. }bd
  309. /GetAngle
  310. {
  311.   Ty sub Sy div exch Tx sub Sx div atan
  312. }bd
  313. /m matrix def
  314. /GW
  315. {
  316.   iRes 12 div PW add cvi
  317. }bd
  318. /DoW
  319. {
  320.   iRes 50 div PW add cvi
  321. }bd
  322. /DW
  323. {
  324.   iRes 8 div PW add cvi
  325. }bd
  326. /SP
  327. {
  328.   /PW ed/iP ed
  329.   iP 0 ge
  330.   {
  331.     iP 0 eq
  332.       {[] 0 setdash}
  333.     if
  334.     iP 1 eq
  335.       {[DW GW] 0 setdash}
  336.     if
  337.     iP 2 eq
  338.       {[DoW GW] 0 setdash}
  339.     if
  340.     iP 3 eq
  341.       {[DW GW DoW GW] 0 setdash}
  342.     if
  343.     iP 4 eq
  344.       {[DW GW DoW GW DoW GW] 0 setdash}
  345.     if
  346.   }if
  347. }bd
  348. /E
  349. {
  350.   /ThisCTM m cm def
  351.     np tr scale 0 0 1 0 360 arc cp 
  352.   ThisCTM sm
  353. }bd
  354. /OB
  355. {
  356.   gs
  357.     np B 1 setgray fill
  358.   gr
  359. }bd
  360. /AtoR
  361. {2 index sub exch 3 index sub exch}bd
  362. /restorestate {
  363.     fontname (NONE) eq {tmpobj restore} if
  364. } bind def
  365. /svobja save def
  366. /iPRY 0 def
  367. /iPGM 0 def
  368. /iPBC 0 def
  369. /iPK 0 def
  370. /iBRY 0 def
  371. /iBGM 0 def
  372. /iBBC 0 def
  373. /iBK 0 def
  374. /iTRY 0 def
  375. /iTGM 0 def
  376. /iTBC 0 def
  377. /iTK 0 def
  378. /iHRY 0 def
  379. /iHGM 0 def
  380. /iHBC 0 def
  381. /iHK 0 def
  382. /iPUsingRGB 1 def
  383. /iBUsingRGB 1 def
  384. /iTUsingRGB 1 def
  385. /iHUsingRGB 1 def
  386. /ACSetPenRGB
  387. {
  388.   /iPUsingRGB 1 def
  389.   pC
  390.   SP
  391. }def
  392. /ACSetPenYMCK
  393. {
  394.   /iPUsingRGB 0 def
  395.   pC
  396.   SP
  397. }def
  398. /ACSetBrushRGB
  399. {
  400.   /iBUsingRGB 1 def
  401.   /iB ed
  402.   iB 0 eq
  403.   {bC}if
  404. }def
  405. /ACSetBrushYMCK
  406. {
  407.   /iBUsingRGB 0 def
  408.   /iB exch def
  409.   iB 0 eq
  410.   {bC}if
  411. }def
  412. /ACSetTextColorRGB
  413. {
  414.   /iTUsingRGB 1 def
  415.   tC
  416. }def
  417. /ACSetTextColorYMCK
  418. {
  419.   /iTUsingRGB 0 def
  420.   tC
  421. }def
  422. /ACSetHatchColorRGB
  423. {
  424.   /iHUsingRGB 1 def
  425.   hC
  426. }def
  427. /ACSetHatchColorYMCK
  428. {
  429.   /iHUsingRGB 0 def
  430.   hC
  431. }def
  432. /ACPenColor/PC ld
  433. /ACSolidColor/BC ld
  434. /ACTextColor/TC ld
  435. /ACHatchColor/HC ld
  436. /ACFillPoly
  437. {
  438.   iB 0 eq{ACSolidColor fill}if
  439.   iB 1 eq{}if
  440.   iB 2 eq{}if
  441.   iB 3 eq{ACPatColor fill}if
  442. }bd          
  443. /ACEOFillPoly
  444. {
  445.   iB 0 eq{ACSolidColor eofill}if
  446.   iB 1 eq{}if
  447.   iB 2 eq{}if
  448.   iB 3 eq{ACPatColor eofill}if
  449. }bd
  450. /ACGDIStroke
  451. {
  452.   iP 0 ge iP 5 lt and
  453.     {S}
  454.     {np}
  455.   ifelse
  456. }bd
  457. /ACGDIEllipse
  458. {
  459.   1 index 4 index sub 2 div abs dup 0 eq{pop 1}if  
  460.   1 index 4 index sub 2 div abs dup 0 eq{pop 1}if  
  461.   6 -1 roll 5 -1 roll add 2 div                    
  462.   5 -1 roll 5 -1 roll add 2 div               
  463.   gs
  464.     E
  465.     /Now save def
  466.       ACFillPoly
  467.     Now restore
  468.     ACGDIStroke
  469.   gr
  470. }bd
  471. /ABox
  472. {
  473.   /y3 ed/x3 ed
  474.   /y2 ed/x2 ed
  475.   /y1 ed/x1 ed
  476.   /y0 ed/x0 ed
  477.   /Sx x1 x0 sub 2 div abs dup 0 eq{pop 1}if def
  478.   /Sy y1 y0 sub 2 div abs dup 0 eq{pop 1}if def
  479.   Sx Sy min/r ed
  480.   x0 x1 add 2 div/Tx ed y0 y1 add 2 div /Ty ed
  481.   Tx Ty tr
  482.   Sx r div Sy r div scale
  483.   0 0 r
  484.   x0 x1 eq y0 y1 eq or
  485.   {
  486.     y0 y1 eq
  487.     {
  488.       x2 x3 le
  489.         {90 180}
  490.         {0 90}
  491.       ifelse 
  492.     }
  493.     {
  494.       y2 y3 le
  495.         {0 90}
  496.         {270 360}
  497.       ifelse 
  498.     }
  499.     ifelse 
  500.   }
  501.     {x3 y3 GetAngle x2 y2 GetAngle}
  502.   ifelse 
  503. }def
  504. /ACGDIArc
  505. {
  506.   gs
  507.     /ThisCTM m cm def
  508.       ABox np arc ACGDIStroke
  509.     ThisCTM m sm
  510.   gr
  511. }def
  512. /ACGDIPie
  513. {
  514.   gs                
  515.     /ThisCTM m cm def
  516.       ABox np 0 0 M arc cp
  517.     ThisCTM m sm
  518.     /Now save def
  519.       ACFillPoly
  520.     Now restore
  521.     ACGDIStroke
  522.   gr
  523. }def
  524. /ratGdiDev{iDevRes iRes div}def
  525. /Align{ratGdiDev mul round ratGdiDev div}def
  526. /AlignXY{iRes iDevRes ne{Align exch Align exch}if}def
  527. /ACPolyPoints
  528. {
  529.   {L}
  530.   repeat
  531. }
  532. def
  533. /ACPL
  534. {
  535.   mark 1 index 2 mul 2 add 1 roll  
  536.   np
  537.   3 1 roll
  538.   .5 add exch .5 add exch M
  539.   1 sub{.5 add exch .5 add exch L}repeat
  540.   ACGDIStroke
  541.   cleartomark
  542. }bd
  543. /ACGDIPolyLine/ACPL ld
  544. /ACStartFill
  545. {
  546.   np M
  547. }bd
  548. /ACEndFill
  549. {
  550.   cp
  551.   gs
  552.     0 ne
  553.       {ACEOFillPoly}
  554.       {ACFillPoly}
  555.     ifelse
  556.   gr
  557.   ACGDIStroke
  558. }def
  559. /ACGDILine
  560. {
  561.   /Now save def
  562.     np
  563.     4 2 roll M L
  564.     ACGDIStroke
  565.   Now restore
  566. }bd
  567. /AT
  568. {
  569.   ACTextColor
  570.   /numChars exch cvi def
  571.   /charString ed
  572.   /charWidths ed
  573.   /yChar exch cvi def/xChar exch cvi def
  574.   /charCount -1 def
  575.   numChars -1 add
  576.   numChars
  577.   {
  578.     /charCount charCount 1 add def
  579.     /char charString charCount 1 getinterval def
  580.     /xChar charWidths charCount get cvi def
  581.     xChar yChar M
  582.     char show
  583.   }repeat
  584.   pop
  585. }bd
  586. /ACRR
  587. {
  588.   /xt exch def
  589.   /yt exch def
  590.   /ang exch def    
  591.   /ThisCTM m cm def
  592.     np
  593.     /y2 ed/x2 ed/ys y2 x2 div 1 max def/xs x2 y2 div 1 max def
  594.     /y1 exch ys div def/x1 exch xs div def/y0 exch ys div def
  595.     /x0 exch xs div def/r2 x2 y2 min 2 div def 
  596.     xt yt translate
  597.     ang rotate xs ys scale x0 r2 add y0 M 
  598.     x1 y0 x1 y1 r2 arcto 4{pop}repeat x1 y1 x0 y1 r2 arcto 4{pop}repeat
  599.     x0 y1 x0 y0 r2 arcto 4{pop}repeat x0 y0 x1 y0 r2 arcto 4{pop}repeat cp
  600.   ThisCTM sm
  601. }def
  602. /ACGDIRoundRect
  603. {
  604.  gs
  605.     ACRR
  606.     /Now save def
  607.         ACFillPoly
  608.     Now restore
  609.     ACGDIStroke
  610.  gr
  611. }bd
  612. /ER
  613. {
  614.   /ThisCTM m cm def
  615.     np tr ang rotate scale 0 0 1 0 360 arc cp 
  616.   ThisCTM sm
  617. }bd
  618. /ACGDIREllipse
  619. {
  620.   /ang exch def    
  621.   1 index 4 index sub 2 div abs dup 0 eq{pop 1}if  
  622.   1 index 4 index sub 2 div abs dup 0 eq{pop 1}if  
  623.   6 -1 roll 5 -1 roll add 2 div                    
  624.   5 -1 roll 5 -1 roll add 2 div               
  625.   gs
  626.     ER
  627.     /Now save def
  628.       ACFillPoly
  629.     Now restore
  630.     ACGDIStroke
  631.   gr
  632. }bd
  633. /AD_SETSCREEN
  634. {
  635.   /userangle exch def
  636.   /userfreq exch def
  637.   currentscreen
  638.   /spotproc exch def
  639.   /currangle exch def
  640.   /currfreq exch def
  641.   userangle currangle ne userfreq currfreq ne or
  642.   {
  643.     userfreq userangle {spotproc} setscreen
  644.   }
  645.   if
  646. }bd
  647. /AD_RGBIMAGE
  648. {
  649.     /here save def
  650.     /rotAngle exch def
  651.     /bits exch def
  652.     /h exch def
  653.     /w exch def
  654.     /dh exch def
  655.     /dw exch def
  656.     /y0 exch def
  657.     /x0 exch def
  658.     /sx w dw div def
  659.     /sy h dh div def
  660.     /imbuf w bits mul 3 mul 7 add 8 idiv string def
  661.     x0 y0 translate
  662.     rotAngle rotate
  663.     w h bits [sx 0 0 sy 0 0] {currentfile imbuf readhexstring pop} false 3
  664.       colorimage
  665.     here restore
  666. } def
  667. /AD_CMYKIMAGE
  668. {
  669.   /Now save def
  670.     /bits ed
  671.     /h ed/w ed
  672.     /dh ed/dw ed
  673.     /y0 ed/x0 ed
  674.     /sx w dw div def/sy h dh div def
  675.     /imbuf w bits mul 4 mul 7 add 8 idiv string def
  676.     x0 y0 translate
  677.     w h bits [sx 0 0 sy 0 0] {currentfile imbuf readhexstring pop}
  678.     false 4 colorimage
  679.   Now restore
  680. }bd
  681. /AD_CONTONEIMAGE
  682. {
  683.     /Now save def
  684.     /rotAngle ed
  685.     /gry2 ed/gry1 ed
  686.     /bits ed
  687.     /h ed/w ed
  688.     /dh ed/dw ed
  689.     /y0 ed/x0 ed
  690.     /sx w dw div def/sy h dh div def
  691.     /imbuf w bits mul 7 add 8 idiv string def
  692.     x0 y0 translate
  693.     rotAngle rotate
  694.     w h bits [sx 0 0 sy 0 0]
  695.     {currentfile imbuf readhexstring pop} image
  696.   Now restore
  697. }bd
  698. /AD_IMAGE
  699. {
  700.   /Now save def
  701.     /rotAngle ed
  702.     /gry2 ed/gry1 ed
  703.     /bits ed
  704.     /h ed/w ed/dh ed/dw ed
  705.     /y0 ed/x0 ed
  706.     /sx w dw div def/sy h dh div def
  707.     /imbuf w bits mul 7 add 8 idiv string def
  708.     {
  709.     0 eq
  710.       {gry1}
  711.       {gry2}
  712.     ifelse
  713.     }
  714.     settransfer
  715.     x0 y0 tr
  716.     rotAngle rotate
  717.     w h bits [sx 0 0 sy 0 0] {currentfile imbuf readhexstring pop}
  718.     image
  719.   Now restore
  720. }bd
  721. /AD_IMAGEMASK
  722. {
  723.   /Now save def
  724.     /rotAngle ed
  725.     /gry ed
  726.     /invflg ed
  727.     /h ed/w ed
  728.     /dh ed/dw ed
  729.     /y0 ed/x0 ed
  730.     /sx w dw div def/sy h dh div def
  731.     /imbuf w 1 mul 7 add 8 idiv string def
  732.     gry setgray
  733.     x0 y0 tr
  734.     rotAngle rotate
  735.     w h 1 invflg eq [sx 0 0 sy 0 0]{currentfile imbuf readhexstring pop}
  736.     imagemask
  737.   Now restore
  738. }bd
  739. {} settransfer
  740.  
  741. /ACFillRect
  742. {
  743.   /Now save def
  744.     AtoR
  745.     4 2 roll      
  746.     np B
  747.     gs
  748.       ACFillPoly
  749.     gr
  750.   Now restore
  751. }bd
  752. /ACBEZLCLOSE  {gs np M {ct} repeat cp ACGDIStroke np gr }def
  753. /ACBEZLINE  {gs np M {ct} repeat  ACGDIStroke np gr }def
  754. /ACBEZSHAPE {gs np M {ct} repeat cp ACFillPoly ACGDIStroke gr }def
  755. %%EndProlog
  756.